import React from "react";
import { HashRouter, Switch, Route } from "react-router-dom";
import Loading from '../pages/loading';
import Main from '../pages/main';
import MerLogReg from '../pages/merchant';
import ShopOpenNotice from '../pages/merchant/notice';
import MerLogin from '../pages/merchant/login';
import MerRegistration from '../pages/merchant/registration';
import StoreInformation from '../pages/merchant/store-inform';
import LogSuccess from '../pages/merchant/log-success';
import UserLogReg from '../pages/user';
import UserLogin from '../pages/user/login';
import UserRegistration from '../pages/user/registration';
import LoginSuccessProps from '../components/login-success';
import Mobile from '../pages/mobile';
import userIndex from '../pages/index'
import Grounding from "../pages/mobile/manage/grounding";
import ProductDetail from "../pages/index/product-detail";
import Maintain from "../pages/mobile/manage/maintain";

const Router: React.FC = () => {
    return (
        <HashRouter>
            <Switch>
                <Route path="/loading" exact component={Loading} />  
                {/* 主页面 */}
                <Route path="/" exact component={Main} />
                {/* 商家登陆注册 */}
                <Route path="/merLogReg" exact component={MerLogReg} />
                <Route path="/merLogReg/shopOpenNotice" exact component={ShopOpenNotice} />
                <Route path="/merLogReg/merLogin" exact component={MerLogin} />
                <Route path="/merLogReg/merRegistration" exact component={MerRegistration} />
                <Route path="/merLogReg/storeInformation" exact component={StoreInformation} />
                <Route path="/merLogReg/logSuccess" exact component={LogSuccess} />

                {/* 用户登陆注册 */}
                <Route path="/userLogReg" exact component={UserLogReg} />
                <Route path="/userLogReg/userLogin" exact component={UserLogin} />
                <Route path="/userLogReg/userRegistration" exact component={UserRegistration} />
                <Route path="/user" exact component={userIndex} />
                <Route path="/productDetail" exact component={ProductDetail} />
                {/* 注册成功 */}
                {/* <Route path="/loginSuccessProps" exact component={LoginSuccessProps} /> */}

                <Route path='/merchant' exact component={Mobile} />
                <Route path='/grounding' exact component={Grounding} />
                <Route path='/maintain' exact component={Maintain} />
            </Switch>
        </HashRouter>
    )
}

export default Router